﻿using System;
using System.Data;

namespace Smatime.Web.Models
{
    public class StaffTimeEdit : BaseEntity
    {
        public long CompanyId { get; set; }
        public long StoreId { get; set; }
        public long StaffTimeTableId { get; set; }
        public DateTime StampDate { get; set; }
        public string StoreName { get; set; }
        public string StaffName { get; set; }
        public string CheckIn { get; set; }
        public string CheckOut { get; set; }

        public override BaseEntity FromDataRow(DataRow row)
        {
            Id = (long) row["Id"];
            CompanyId = (long) row["CompanyId"];
            StoreId = (long) row["StoreId"];
            StaffTimeTableId = (long) row["StaffTimeTableId"];
            StoreName = row["StoreName"].ToString();
            StampDate = (DateTime) row["StampDate"];
            StaffName = row["StaffName"].ToString();
            CheckIn = row["CheckIn"].ToString();
            CheckOut = row["CheckOut"].ToString();

            return base.FromDataRow(row);
        }

        public override void ToDataRow(DataRow row)
        {
            base.ToDataRow(row);
        }
    }
}